<template>

  <div>
    <button @click="isShow=!isShow">显示/隐藏</button>


      <h1 v-show="isShow" key="1" class="animate"> 你好啊</h1>
      <h1 v-show="!isShow" key="2" class="animate"> 你好啊1</h1>
  </div>
</template>

<script>
import "animate.css"
export default {
  name: "Test",
  data(){

    return {
      isShow:false
    }
  }
}
</script>

<style scoped>
h1{
  background: cadetblue;
}

.animate{

  animation: whu 0.6s linear;
}

@keyframes whu {

  from{
    transform: translate(-100%);
  }
  to{
    transform: translate(0);
  }
}
</style>
